﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Fis.Win.Map
{
    public partial class ReportMapControl : DevExpress.XtraEditors.XtraUserControl
    {
        public ReportMapControl()
        {
            InitializeComponent();
        }

        private void lnkRate_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("REPORT.BALANCE", "View"))
            {
                using (var f = new Fis.Win.Forms.BalanceReportForm())
                {
                    f.ShowDialog();
                }
            }
        }

        private void labelControl1_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("REPORT.INCOME", "View"))
            {
                using (var f = new Fis.Win.Forms.IncomeReportForm())
                {
                    f.ShowDialog();
                }
            }
        }

        private void labelControl2_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("REPORT.BOOK", "VIEW"))
            {
                var f = new Fis.Win.Forms.BookReportForm();
                f.ShowDialog();
            }
        }

        private void labelControl3_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("REPORT.DETAIL", "VIEW"))
            {
                var f = new Fis.Win.Forms.DetailReportForm();
                f.ShowDialog();
            }
        }

        private void labelControl4_Click(object sender, EventArgs e)
        {
            if (Fis.Win.Utils.AppSession.RightsValidata("REPORT.REST", "VIEW"))
            {
                var f = new Fis.Win.Forms.RestReportForm();
                f.ShowDialog();
            }
        }
    }
}
